// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ExportStepInfo.cs" company="">
//   
// </copyright>
// --------------------------------------------------------------------------------------------------------------------
namespace ExecutionTool.ImportExport
{
    using System;

    using ExecutionTool.CopyDatabase;

    public class ExportStepInfo
    {
        #region Constructors and Destructors

        public ExportStepInfo(Guid statusTrackId, string blobAddress, double bacpacFileSizeInBytes, SqlAzureDatabaseInfo info)
        {
            this.StatusTrackId = statusTrackId;
            this.BlobAddress = blobAddress;
            this.BacpacFileSizeInBytes = bacpacFileSizeInBytes;
            this.DatabaseInfo = info;
        }

        #endregion

        #region Public Properties

        public double BacpacFileSizeInBytes { get; set; }

        public string BlobAddress { get; private set; }

        public string BlobName
        {
            get
            {
                return this.BlobAddress.Split('/')[1];
            }
        }

        public string ContainerName
        {
            get
            {
                return this.BlobAddress.Split('/')[0];
            }
        }

        public SqlAzureDatabaseInfo DatabaseInfo { get; set; }

        public Guid StatusTrackId { get; private set; }

        #endregion
    }
}
